package com.greensecurity.sim.repository;

import com.greensecurity.sim.entity.UserMessage;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

@Repository
public interface UserMessageRepository extends JpaRepository<UserMessage, Long> {

    List<UserMessage> findByUserId(Long userId);


    List<UserMessage> findByUserIdAndIsRead(Long userId, Boolean isRead);


}
